#!/usr/bin/env bash

tar -cf ./tmp/public.tar.gz public
sshpass -p"walterpwd" scp -P22 ./tmp/public.tar.gz root@120.25.153.197:~/tmp
sshpass -p"walterpwd" ssh -P22 -q root@120.25.153.197 "rm -rf /var/www/blog/* || true && tar -xf ~/tmp/public.tar.gz -C /var/www/blog && rm -rf ~/tmp/public.tar.gz" 
